package eleanor.ltd.isRealEstate.pages.user;

import java.util.List;

import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import eleanor.ltd.isRealEstate.annotations.AdministratorAccess;
import eleanor.ltd.isRealEstate.dao.user.UserDAO;
import eleanor.ltd.isRealEstate.entities.user.User;

@AdministratorAccess
public class BrowseUser {

	@Property
	private List<User> userList;
	
	@Property
	private User user;
	
	@Inject
	private UserDAO userDAO;
	
	void onActivate() {
		userList = userDAO.findAll();
	}
	
//	@OnEvent(component = "deleteLink")
//	Object onDeleteLink(Long id) {
//		userDAO.deleteByID(id);
//		return null;
//	}
	
}
